@extends('layouts.console_header')

@section('title', '历史设置记录')

@section('resources')
    @parent
<style>
    .display{text-align: center;background-color: #fff;border-collapse:collapse;}
    .display th{padding: 20px 0;}
    .display #tbody_content{border-top: 1px solid #000;border-bottom: 1px solid #000;font-size: 14px;}
    .display #tbody_content tr:nth-child(2n+1){border-bottom: 1px solid #ddd;background-color: #f9f9f9;}
    .display #tbody_content tr:nth-child(2n){border-bottom: 1px solid #ddd;}
    .display #tbody_content tr td{padding: 10px;}
    .display #tbody_content tr td:nth-child(1){background-color: #f1f1f1;}
</style>
@endsection

@section('content')
<!--  html内容  -->
<section class="user_list">
	<div style="border-bottom: 2px solid #9955c6;overflow: hidden;">
		<p class="fz_14 account_title fl" style="border: none;"><span style="color: #7f7f7f;"><a href="/console/index">首页</a>>地推管理><a href="/console/salesman/setup">地推设置</a>></span><span class="co_violet">历史设置记录</span></p>
		<a onclick="history.go(-1);" href="#"><p class="fr tc back_btn">返回</p></a>
	</div>
	<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th style="width: 50px;">序号</th>
                <th style="width: 170px;">设置时间</th>
                <th style="width: 90px;">地推类型</th>
                <th style="width: 90px;">地推名称</th>
                <th style="width: 90px;">是否有效</th>
                <th style="width: 90px;">结算周期</th>
                <th style="width: 300px;">有效地推定义</th>
                <th style="width: 400px;">地推结算</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th>序号</th>
                <th>设置时间</th>
                <th>地推类型</th>
                <th>地推名称</th>
                <th>是否有效</th>
                <th>结算周期</th>
                <th>有效地推定义</th>
                <th>地推结算</th>
            </tr>
        </tfoot>
        <tbody id="tbody_content">
            @foreach($lists as $list)
            <tr>
            @if(!isset($i))
                <td>{{$i=1}}</td>
            @else
                <td>{{++$i}}</td>
            @endif
                <td>{{date('Y-m-d', strtotime($list['created_at']))}}</td>
            @if($list['salesmantype'] == 'usersalesman')
                <td>个人地推</td>
            @elseif(($list['salesmantype'] == 'shopsalesman')&&($list['shoptype'] == 'common'))
                <td>商家普通地推</td>
            @elseif(($list['salesmantype'] == 'shopsalesman')&&($list['shoptype'] == 'partner'))
                <td>商家合伙人地推</td>
            @else
                <td></td>
            @endif

            <td>{{$list['name']}}</td>

            @if($list['status'] == 1)
                <td>有效</td>
            @else
                <td>无效</td>
            @endif
                <td>{{$list['accountperioddescription']}}</td>
                <td>{{$list['showvalidsalesman']}}</td>
                <td>{{$list['showaccountmethod']}}</td>
            </tr>
            @endforeach
        </tbody>
    </table>
</section>
@endsection

@section('scriptResources')
    @parent
    <script>
        
    </script>
@endsection